package by.dkusch.aircompany.model.tables;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import by.dkusch.aircompany.model.tables.base.BaseEntity;

@Entity
public class Region extends BaseEntity<Long> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@NotNull
	@Size(max = 30)
	@Column
	private String code;

	@Size(max = 30)
	@NotNull
	@Column
	private String localCode;

	@Size(max = 50)
	@Column
	private String name;

	@Size(max = 2)
	@Column
	private String continent;

	@NotNull
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = Country.class)
	private Country country;

	@Size(max = 250)
	@Column
	private String wikipediaLink;

	@Size(max = 250)
	@Column
	private String description;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getLocalCode() {
		return localCode;
	}

	public void setLocalCode(String localCode) {
		this.localCode = localCode;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getContinent() {
		return continent;
	}

	public void setContinent(String continent) {
		this.continent = continent;
	}

	public Country getCountry() {
		return country;
	}

	public void setCountry(Country country) {
		this.country = country;
	}

	public String getWikipediaLink() {
		return wikipediaLink;
	}

	public void setWikipediaLink(String wikipediaLink) {
		this.wikipediaLink = wikipediaLink;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
